import request from '@/utils/request'


export function getPermissions() {
    return request({
      url: '/auth/getpermission',
      method: 'get'
    })
  }
export function queryByname(name) {
    return request({
      url: '/auth/queryByname',
      method: 'get',
      params: { name }
    })
}  
export function updatePer(id, data) {
    return request({
      url: `/auth/updatePer/${id}`,
      method: 'put',
      data
    })
  }

  export function deletePer(id) {
    return request({
      url: `/auth/deletePer/${id}`,
      method: 'delete'
    })
  }

  export function addPer(data) {
    return request({
      url: '/auth/addPer',
      method: 'post',
      data
    })
  }